package system.config.quartz.util;

import lombok.Getter;
import org.quartz.Job;

/**
 * Quartz 定时任务枚举
 *
 * @author mizepeng
 * @since 2023-3-21 上午 10:38
 */
@Getter
public enum JobEnum {

	/**
	 * 此定时任务用来删除OSS上没有使用的头像文件
	 */
	AvatarDeleteJob("AvatarDeleteJob", OssConstants.GROUP_OSS, system.config.quartz.job.AvatarDeleteJob.class);

	private final String name;
	private final String group;
	private final Class<? extends Job> clazz;

	JobEnum(String name, String group, Class<? extends Job> clazz) {
		this.name = name;
		this.group = group;
		this.clazz = clazz;
	}

	public String getDescription() {
		return this.group + " - " + this.name;
	}

}
